/*******************************************************************************
 * Copyright (c) 2005, 2014 springside.github.io
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 *******************************************************************************/
package net.wofly.right.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;

import net.wofly.right.domain.Role;

public interface RoleRepository
        extends PagingAndSortingRepository<Role, String>, JpaSpecificationExecutor<Role> {
	
	@Query("select r from Role r  where r.roleID > :roleID")
    List<Role> findCustomType(@Param(value = "roleID") String roleID);


    /**
     * 根据有效状态查询角色列表
     *
     * @param status
     * @return List<Role>
     */
    List<Role> findByStatus(Integer status);
}